<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>巧用outline实现九宫格分隔</title>
    <style>
        .flexbox {
            display: flex;
            flex-wrap: wrap;
            width: 300px;
            height: 300px;
            outline: 1px solid #fff;
            outline-offset: -1px;
        }

        .child {
            flex: 33%;
            box-sizing: border-box;
            border: 1px solid;
        }
    </style>
</head>

<body>
    <div class="flexbox">
        <div class="child">测试测试文字</div>
        测试测试文字
    </div>
</body>

</html>